import 'base_res.dart';

class BaseListResEntity<T extends BaseItem> {
  BaseListResEntity({
    this.hasNext,
    this.list,
  });

  BaseListResEntity.fromJson(dynamic json, T Function(dynamic v) createItem) {
    hasNext = json['hasNext'];
    total = json['total'];
    if (json['obj'] != null) {
      obj = json['obj'];
    }
    if (json['list'] != null) {
      list = [];
      json['list'].forEach((v) {
        list!.add(createItem(v));
      });
    }
  }

  bool? hasNext;
  List<T>? list;
  int? total;
  dynamic obj;
}
